package com.example.book.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.spring.web.plugins.Docket;

@Configuration("bookSwaggerConfig")
public class BookSwaggerConfig {

    private final com.example.common.config.SwaggerConfig commonSwaggerConfig;

    public BookSwaggerConfig(com.example.common.config.SwaggerConfig commonSwaggerConfig) {
        this.commonSwaggerConfig = commonSwaggerConfig;
    }

    @Bean("bookApiDocket")
    public Docket bookSwaggerConfig() {
        return commonSwaggerConfig.createRestApi(
                "com.example.book.controller",
                "BookShop-Cloud (Book) API 文档"
        );
    }
}
